﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Client.model
{
    public class Command : INotifyPropertyChanged
    {
        //Dictionary<string, Action> directionDictionary = new Dictionary<string, Action> {{"LEFT",MoveLeft} ,{"RIGHT",MoveRight},{"UP",MoveUp},{"DOWN",MoveDown}};
        int commandNumber;
        string commandName;

      
        public static int HEARING_SAVE      = 7100;
        public static int HEARING_AFTER     = 71100;
        public static int PITTING_MODE1_ON  = 72100;
        public static int PITTING_MODE1_OFF = 72101;
        public static int PITTING_MODE2_ON  = 72200;
        public static int PITTING_MODE2_OFF = 72201;
        public static int PITTING_MODE3_ON  = 72300;
        public static int PITTING_MODE3_OFF = 72301;

        public static int PITTING_MODE1_OVERALL_DOWN = 72110;
        public static int PITTING_MODE1_LOUD_DOWN    = 72111;
        public static int PITTING_MODE1_SOFT_DOWN    = 72112;
        public static int PITTING_MODE1_OVERALL_UP   = 72113;
        public static int PITTING_MODE1_LOUD_UP      = 72114;
        public static int PITTING_MODE1_SOFT_UP      = 72115;

        public static int PITTING_MODE2_OVERALL_DOWN = 72210;
        public static int PITTING_MODE2_LOUD_DOWN    = 72211;
        public static int PITTING_MODE2_SOFT_DOWN    = 72212;
        public static int PITTING_MODE2_OVERALL_UP   = 72213;
        public static int PITTING_MODE2_LOUD_UP      = 72214;
        public static int PITTING_MODE2_SOFT_UP      = 72215;

        public static int PITTING_MODE3_OVERALL_DOWN = 72310;
        public static int PITTING_MODE3_LOUD_DOWN    = 72311;
        public static int PITTING_MODE3_SOFT_DOWN    = 72312;
        public static int PITTING_MODE3_OVERALL_UP   = 72313;
        public static int PITTING_MODE3_LOUD_UP      = 72314;
        public static int PITTING_MODE3_SOFT_UP      = 72315;

        public static int PITTING_MODE1_LEFT_0_to_200HZ      = 72120;
        public static int PITTING_MODE1_LEFT_200_to_800HZ    = 72121;
        public static int PITTING_MODE1_LEFT_800_to_200HZ    = 72122;
        public static int PITTING_MODE1_LEFT_1500_to_200HZ   = 72123;
        public static int PITTING_MODE1_LEFT_2250_to_200HZ   = 72124;
        public static int PITTING_MODE1_LEFT_OCCULUSION_LOW  = 72125;
        public static int PITTING_MODE1_LEFT_OCCULUSION_HIGH = 72126;

        public static int PITTING_MODE2_LEFT_0_to_200HZ      = 72220;
        public static int PITTING_MODE2_LEFT_200_to_800HZ    = 72221;
        public static int PITTING_MODE2_LEFT_800_to_200HZ    = 72222;
        public static int PITTING_MODE2_LEFT_1500_to_200HZ   = 72223;
        public static int PITTING_MODE2_LEFT_2250_to_200HZ   = 72224;
        public static int PITTING_MODE2_LEFT_OCCULUSION_LOW  = 72225;
        public static int PITTING_MODE2_LEFT_OCCULUSION_HIGH = 72226;

        public static int PITTING_MODE3_LEFT_0_to_200HZ      = 72320;
        public static int PITTING_MODE3_LEFT_200_to_800HZ    = 72321;
        public static int PITTING_MODE3_LEFT_800_to_200HZ    = 72322;
        public static int PITTING_MODE3_LEFT_1500_to_200HZ   = 72323;
        public static int PITTING_MODE3_LEFT_2250_to_200HZ   = 72324;
        public static int PITTING_MODE3_LEFT_OCCULUSION_LOW  = 72325;
        public static int PITTING_MODE3_LEFT_OCCULUSION_HIGH = 72326;

        public static int PITTING_MODE3_BEFORE = 72400;
        public static int PITTING_MODE3_AFTER  = 72500;

        public static int ADDITIONAL_NOISE_CONTROL_ON     = 73000;
        public static int ADDITIONAL_NOISE_CONTROL_OFF    = 73001;
        public static int ADDITIONAL_FEEDBACK_CONTROL_ON  = 73100;
        public static int ADDITIONAL_FEEDBACK_CONTROL_OFF = 73101;
        public static int ADDITIONAL_BATTERY_ALARM_ON     = 73200;
        public static int ADDITIONAL_BATTERY_ALARM_OFF    = 73201;
        public static int ADDITIONAL_VOLUME_CONTROL_ON    = 73300;
        public static int ADDITIONAL_VOLUME_CONTROL_OFF   = 73301;
        public static int ADDITIONAL_CRESCENDO       = 73400;
        public static int ADDITIONAL_DECRESCENDO     = 73401;
        public static int ADDITIONAL_BEFORE               = 73500;
        public static int ADDITIONAL_AFTER                = 73600;

        public void Hearing_Save()
        {
            CommandNumber = HEARING_SAVE; CommandName = "HEARING_SAVE";        
        }
        public void Hearing_After() { CommandNumber = HEARING_AFTER; CommandName = "HEARING_AFTER"; }
        public void Pitting_Mode1_Overall_Down() { CommandNumber = PITTING_MODE1_OVERALL_DOWN; CommandName = "PITTING_MODE1_OVERALL_DOWN"; }
        public void Pitting_Mode1_Loud_Down() { CommandNumber = PITTING_MODE1_LOUD_DOWN; CommandName = "PITTING_MODE1_LOUD_DOWN"; }
        public void Pitting_Mode1_Soft_Down() { CommandNumber = PITTING_MODE1_SOFT_DOWN; CommandName = "PITTING_MODE1_SOFT_DOWN"; }
        public void Pitting_Mode1_Overall_Up() { CommandNumber = PITTING_MODE1_OVERALL_UP; CommandName = "PITTING_MODE1_OVERALL_UP"; }
        public void Pitting_Mode1_Loud_Up() { CommandNumber = PITTING_MODE1_LOUD_UP; CommandName = "PITTING_MODE1_LOUD_UP"; }
        public void Pitting_Mode1_Soft_Up() { CommandNumber = PITTING_MODE1_SOFT_UP; CommandName = "PITTING_MODE1_SOFT_UP"; }

        public void Pitting_Mode2_OverallDown() { CommandNumber = PITTING_MODE2_OVERALL_DOWN; CommandName = "PITTING_MODE2_OVERALL_DOWN"; }
        public void Pitting_Mode2_Loud_Down() { CommandNumber = PITTING_MODE2_LOUD_DOWN; CommandName = "PITTING_MODE2_LOUD_DOWN"; }
        public void Pitting_Mode2_Soft_Down() { CommandNumber = PITTING_MODE2_SOFT_DOWN; CommandName = "PITTING_MODE2_SOFT_DOWN"; }
        public void Pitting_Mode2_Overall_Up() { CommandNumber = PITTING_MODE2_OVERALL_UP; CommandName = "PITTING_MODE2_OVERALL_UP"; }
        public void Pitting_Mode2_Loud_Up() { CommandNumber = PITTING_MODE2_LOUD_UP; CommandName = "PITTING_MODE2_LOUD_UP"; }
        public void Pitting_Mode2_Soft_Up() { CommandNumber = PITTING_MODE2_SOFT_UP; CommandName = "PITTING_MODE2_SOFT_UP"; }

        public void Pitting_Mode3_OverallDown() { CommandNumber = PITTING_MODE3_OVERALL_DOWN; CommandName = "PITTING_MODE3_OVERALL_DOWN"; }
        public void Pitting_Mode3_Loud_Down() { CommandNumber = PITTING_MODE3_LOUD_DOWN; CommandName = "PITTING_MODE3_LOUD_DOWN"; }
        public void Pitting_Mode3_Soft_Down() { CommandNumber = PITTING_MODE3_SOFT_DOWN; CommandName = "PITTING_MODE3_SOFT_DOWN"; }
        public void Pitting_Mode3_Overall_Up() { CommandNumber = PITTING_MODE3_OVERALL_UP; CommandName = "PITTING_MODE3_OVERALL_UP"; }
        public void Pitting_Mode3_Loud_Up() { CommandNumber = PITTING_MODE3_LOUD_UP; CommandName = "PITTING_MODE3_LOUD_UP"; }
        public void Pitting_Mode3_Soft_Up() { CommandNumber = PITTING_MODE3_SOFT_UP; CommandName = "PITTING_MODE3_SOFT_UP"; }

        public void Pitting_Mode1_Left_0to200hz() { CommandNumber = PITTING_MODE1_LEFT_0_to_200HZ; CommandName = "PITTING_MODE1_LEFT_0_to_200HZ"; }
        public void Pitting_Mode1_Left_200to800hz() { CommandNumber = PITTING_MODE1_LEFT_200_to_800HZ; CommandName = "PITTING_MODE1_LEFT_200_to_800HZ"; }
        public void Pitting_Mode1_Left_800to1500hz() { CommandNumber = PITTING_MODE1_LEFT_800_to_200HZ; CommandName = "PITTING_MODE1_LEFT_800_to_200HZ"; }
        public void Pitting_Mode1_Left_1500to2250hz() { CommandNumber = PITTING_MODE1_LEFT_1500_to_200HZ; CommandName = "PITTING_MODE1_LEFT_1500_to_200HZ"; }
        public void Pitting_Mode1_Left_2250to4000hz() { CommandNumber = PITTING_MODE1_LEFT_2250_to_200HZ; CommandName = "PITTING_MODE1_LEFT_2250_to_200HZ"; }
        public void Pitting_Mode1_Left_Occlusion_Low() { CommandNumber = PITTING_MODE1_LEFT_OCCULUSION_LOW; CommandName = "PITTING_MODE1_LEFT_OCCULUSION_LOW"; }
        public void Pitting_Mode1_Left_Occlusion_High() { CommandNumber = PITTING_MODE1_LEFT_OCCULUSION_HIGH; CommandName = "PITTING_MODE1_LEFT_OCCULUSION_HIGH"; }

        public void Pitting_Mode2_Left_0to200hz() { CommandNumber = PITTING_MODE2_LEFT_0_to_200HZ; CommandName = "PITTING_MODE2_LEFT_0_to_200HZ"; }
        public void Pitting_Mode2_Left_200to800hz() { CommandNumber = PITTING_MODE2_LEFT_200_to_800HZ; CommandName = "PITTING_MODE2_LEFT_200_to_800HZ"; }
        public void Pitting_Mode2_Left_800to1500hz() { CommandNumber = PITTING_MODE2_LEFT_800_to_200HZ; CommandName = "PITTING_MODE2_LEFT_800_to_200HZ"; }
        public void Pitting_Mode2_Left_1500to2250hz() { CommandNumber = PITTING_MODE2_LEFT_1500_to_200HZ; CommandName = "PITTING_MODE2_LEFT_1500_to_200HZ"; }
        public void Pitting_Mode2_Left_2250to4000hz() { CommandNumber = PITTING_MODE2_LEFT_2250_to_200HZ; CommandName = "PITTING_MODE2_LEFT_2250_to_200HZ"; }
        public void Pitting_Mode2_Left_Occlusion_Low() { CommandNumber = PITTING_MODE2_LEFT_OCCULUSION_LOW; CommandName = "PITTING_MODE2_LEFT_OCCULUSION_LOW"; }
        public void Pitting_Mode2_Left_Occlusion_High() { CommandNumber = PITTING_MODE2_LEFT_OCCULUSION_HIGH; CommandName = "PITTING_MODE2_LEFT_OCCULUSION_HIGH"; }

        public void Pitting_Mode3_Left_0to200hz() { CommandNumber = PITTING_MODE3_LEFT_0_to_200HZ; CommandName = "PITTING_MODE3_LEFT_0_to_200HZ"; }
        public void Pitting_Mode3_Left_200to800hz() { CommandNumber = PITTING_MODE3_LEFT_200_to_800HZ; CommandName = "PITTING_MODE3_LEFT_200_to_800HZ"; }
        public void Pitting_Mode3_Left_800to1500hz() { CommandNumber = PITTING_MODE3_LEFT_800_to_200HZ; CommandName = "PITTING_MODE3_LEFT_800_to_200HZ"; }
        public void Pitting_Mode3_Left_1500to2250hz() { CommandNumber = PITTING_MODE3_LEFT_1500_to_200HZ; CommandName = "PITTING_MODE3_LEFT_1500_to_200HZ"; }
        public void Pitting_Mode3_Left_2250to4000hz() { CommandNumber = PITTING_MODE3_LEFT_2250_to_200HZ; CommandName = "PITTING_MODE3_LEFT_2250_to_200HZ"; }
        public void Pitting_Mode3_Left_Occlusion_Low() { CommandNumber = PITTING_MODE3_LEFT_OCCULUSION_LOW; CommandName = "PITTING_MODE3_LEFT_OCCULUSION_LOW"; }
        public void Pitting_Mode3_Left_Occlusion_High() { CommandNumber = PITTING_MODE3_LEFT_OCCULUSION_HIGH; CommandName = "PITTING_MODE3_LEFT_OCCULUSION_HIGH"; }

        public void Additional_Noise_Control_On() { CommandNumber = ADDITIONAL_NOISE_CONTROL_ON; CommandName = "ADDITIONAL_NOISE_CONTROL_ON"; }
        public void Additional_Noise_Control_Off() { CommandNumber = ADDITIONAL_NOISE_CONTROL_OFF; CommandName = "ADDITIONAL_NOISE_CONTROL_OFF"; }
        public void Additional_Feedback_Control_On() { CommandNumber = ADDITIONAL_FEEDBACK_CONTROL_ON; CommandName = "ADDITIONAL_FEEDBACK_CONTROL_ON"; }
        public void Additional_Feedback_Control_Off() { CommandNumber = ADDITIONAL_FEEDBACK_CONTROL_OFF; CommandName = "ADDITIONAL_FEEDBACK_CONTROL_OFF"; }
        public void Additional_Battery_Alarm_On() { CommandNumber = ADDITIONAL_BATTERY_ALARM_ON; CommandName = "ADDITIONAL_BATTERY_ALARM_ON"; }
        public void Additional_Battery_Alarm_Off() { CommandNumber = ADDITIONAL_BATTERY_ALARM_OFF; CommandName = "ADDITIONAL_BATTERY_ALARM_OFF"; }
        public void Additional_Volumne_Control_On() { CommandNumber = ADDITIONAL_VOLUME_CONTROL_ON; CommandName = "ADDITIONAL_VOLUME_CONTROL_ON"; }
        public void Additional_Volumne_Control_Off() { CommandNumber = ADDITIONAL_VOLUME_CONTROL_OFF; CommandName = "ADDITIONAL_VOLUME_CONTROL_OFF"; }
        public void Additional_Decrescendo() { CommandNumber = ADDITIONAL_DECRESCENDO; CommandName = "ADDITIONAL_DECRESCENDO"; }
        public void Additional_Crescendo() { CommandNumber = ADDITIONAL_CRESCENDO; CommandName = "ADDITIONAL_CRESCENDO"; }
        public void Additional_Before() { CommandNumber = ADDITIONAL_BEFORE; CommandName = "ADDITIONAL_BEFORE"; }
        public void Additional_After() { CommandNumber = ADDITIONAL_AFTER; CommandName = "ADDITIONAL_AFTER"; }

        public int CommandNumber
        {
            get { return commandNumber; }
            set { commandNumber = value; NotifyPropertyChanged("CommandNumber"); }
        }

        public string CommandName
        {
            get { return commandName; }
            set { commandName = value; NotifyPropertyChanged("CommandName"); }
        }       

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
